<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript" src="${pageContext.request.contextPath }/dwr/engine.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/dwr/util.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/dwr/interface/ChatroomService.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/dwr/interface/DwrPush.js"></script>
<script type="text/javascript" src="<c:url value='/js/jquery-2.1.0.js'/>"></script>
<script>
	//load完連至server端記錄該頁面ScripSession，用於DWR
	function onPageLoad(){  
		DwrPush.onPageLoad();  
	}
</script>

</head>

<body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);onPageLoad();">

<c:if test="${ user == null }">
<form action="<c:url value="/LoginServlet" />" method="POST">
	帳號<input type="text" name="id" value="${param.id }"/> ${AccountLock }<br>
	密碼<input type="text" name="pwd"/><br>
	<input type="submit" value="送出">
</form>
<a href="<c:url value="/pages/page1.jsp" />" >page1</a>
<input type="button" id="register" value="註冊帳號" onclick="javascript:location.href='<c:url value="/secure/registerMember.jsp" />'"/>
<input type="button" id="register" value="忘記密碼" onclick="javascript:location.href='<c:url value="/secure/forgotPwd.jsp" />'"/>
</c:if>

<c:if test="${ user != null }">
	ID : ${user.m_id } <br>
	NAME : ${user.m_name } <br>
	E-mail : ${user.m_email } <br>
	<input type="button" value="進入登入成功頁面" onclick="javascript:location.href='<c:url value="/pages/login_successed.jsp" />'"/>
</c:if>
	
</body>
</html>